<?php 
/**
 * 
 * Frabriceert de file klasses
 * @author Ferry Guikema
 *
 */

class File_Factory {
	
	
	public static function factory($type, $webfy)
	{
		/*** importeer de file klasse  ***/
		if ( require_once( strtolower($type) . '.class.php' ) )
		{
			$classname = ucfirst( $type );
			return new $classname($webfy);
		} 
		/*** throw exception als de klasse niet gevonden is ***/
		else 
		{
			throw new Exception ('Factory type not found');
		}
	} # func factory
}

?>